import {Component} from "@angular/core";
import {SidebBarComponent} from "./sidebar.component";
import {ItemComponent} from "./item.component";
import {ProductService} from "./service/product.service";
import {Product} from "./entity/product";
import {Category} from "./entity/category";
/**
 * Created by robin on 2016/8/2 0002.
 */
@Component({selector:"my-content",
            templateUrl:"./app/content.html",
            directives:[SidebBarComponent,ItemComponent],
            providers:[ProductService]})
export class ContentComponent{
    
    private products:Product[];
    
    private categories:Category[];
    
    constructor(productService:ProductService) {
        this.products = productService.getLatestProducts();
        this.categories = productService.getCategory();
    }
    
}